home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_03_05
/
3n05050a
< prev
next >
Wrap
Text File
|
1992-02-05
|
743b
|
45 lines
DOSSEG
.Model Medium
.Stack 100h
.Data
MSG$ DB "Drive "
DRIVENUM DB "? is type "
DRIVETYPE DB "?"
DB 13,10,"$"
.Code
EXTRN DisketteType$FAR:FAR
MAIN PROC
MOV BX,DGROUP ;Point DS
MOV DS,BX ; to data segment
SUB DI,DI ;Drive number
MAIN_1:
MOV AX,DI ;Get drive number
MOV DL,AL ;(Save for call)
ADD AL,"0" ;Make ASCII
MOV [DRIVENUM],AL ;Store in string
CALL DisketteType$FAR ;Get type
ADD AL,"0" ;Convert to ASCII
MOV [DRIVETYPE],AL ;Store in string
MOV AH,9 ;Display string fn
MOV DX,OFFSET MSG$ ; at DS:DX
INT 21H ;Thru DOS
INC DI
CMP DI,4
JBE MAIN_1
MOV AX,4C00H ;Terminate program
INT 21H ;Thru DOS
MAIN ENDP
END MAIN